<#include "layout.html"/>
<@layout>
<h2 class="sub-header">
文章列表
<a class="btn btn-default pull-right" href="${path}/admin/article/add.html" role="button">写文章&nbsp;<span class="glyphicon glyphicon-pencil"></span></a>
</h2>
<div class="table-responsive">
  <table class="table table-striped">
    <thead>
      <tr>
        <th>序号</th>
        <th>标题</th>
        <th>标签</th>
        <th>类型</th>
        <th>类别</th>
        <th>创建时间</th>
        <th>是否结稿</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody>
    	<#list page.list as article>
    	<tr>
	        <td>${article.id}</td>
	        <td>${article.title}</td>
	        <td>
	        	<#list article._tags as tag>
					${tag}&nbsp;
				</#list>
	        </td>
	        <td>
	        	<#if article.type==0>
				原创
				<#else>
				转载
				</#if>
	        </td>
	        <td>${article._project.name}</td>
	        <td>${article._createDateTime}</td>
	        <td>
	        	<#if article.finish == 1>
		        	已结稿
				<#else>
		        	未结稿
				</#if>
	        	
	        </td>
	        <td>
	        	<a class="btn btn-danger" href="${path}/admin/article/delete/${article.id}.html" role="button"><span class="glyphicon glyphicon-trash"></span>删除</a>
	        	<a class="btn btn-primary" href="${path}/admin/article/edit/${article.id}.html" role="button"><span class="glyphicon glyphicon-edit"></span>编辑</a>
	        </td>
	    </tr>
		</#list>
    </tbody>
  </table>
</div>
 <div class="pull-right">
 	<@pagination prefix="&q=${q!}" pageNum=page.pageNumber totalPage=page.totalPage/>
 </div>
</@layout>
